home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / ctutor2 / charout.c < prev    next >
Text File  |  1986-01-30  |  512b  |  17 lines

  1. #include "stdio.h"
  2. main()
  3. {
  4. FILE *point;
  5. char others[35];
  6. int indexer,count;
  7.  
  8.    strcpy(others,"Additional lines.");
  9.    point = fopen("tenlines.txt","a"); /* open for appending */
  10.  
  11.    for (count = 1;count <= 10;count++) {
  12.       for (indexer = 0;others[indexer];indexer++)
  13.          putc(others[indexer],point);  /* output a single character */
  14.       putc('\n',point);                /* output a linefeed */
  15.    }
  16.    fclose(point);
  17. }